﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace LosConn.Web.Control
{
    public partial class ControlHeader : BasePage.AdminBasePageControl
    {
        public Model.Los_User model = new Model.Los_User();
        public Model.Los_Retail modelRetail = new Model.Los_Retail();
        public Int32 User_ID = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                User_Name.InnerHtml = Session["UserName"].ToString();
                User_ID = Convert.ToInt32(Session["UserID"]);
                BLL.Los_User bll = new BLL.Los_User();
                //User_ID.Value = UserID.ToString();
                model = bll.GetModel(User_ID);
                if (model.User_UserType.ToString().Equals("2"))
                {
                    modelRetail = new BLL.Los_Retail().GetModel(Convert.ToInt32(model.User_RetailID));
                }
                else
                {
                    modelRetail.Retail_Money = 0;
                }
            }
        }
    }
}